package fristphase.day9_07.my_plane_battle;

import javax.swing.*;

public class Sky extends FlyingObject{
    private int y1;
    Sky(){
        super(World.WIDTH,World.HEIGHT,0,0,1);
        y1 = -World.HEIGHT;
    }
    public void step(){
        y += speed;
        y1 += speed;
        if(y>height){
            y = -World.HEIGHT;
        }
        if(y1>height){
            y1 = -World.HEIGHT;
        }
    }
    public ImageIcon getImage(){
        return Images.background;
    }
    public int getY1(){
        return y1;
    }
}
